﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.ComponentModel;

namespace Tsanie.ShellExtension.PropertySheet.UI {
    public class ListViewEx : ListView {

        [DefaultValue(View.Details)]
        [Browsable(false)]
        public new View View {
            get { return View.Details; }
        }
        [DefaultValue(true)]
        [Browsable(false)]
        public new bool FullRowSelect { get { return true; } }
        [DefaultValue(false)]
        public new bool HideSelection {
            get { return base.HideSelection; }
            set { base.HideSelection = value; }
        }
        [DefaultValue(BorderStyle.FixedSingle)]
        public new BorderStyle BorderStyle {
            get { return base.BorderStyle; }
            set { base.BorderStyle = value; }
        }

        public ListViewEx() {
            base.View = View.Details;
            base.FullRowSelect = true;
            base.HideSelection = false;
            base.BorderStyle = BorderStyle.FixedSingle;

            SetStyle(ControlStyles.AllPaintingInWmPaint
                   | ControlStyles.OptimizedDoubleBuffer
                   , true);
        }
    }
}
